<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Button事件</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

    <meta name="author" content="http://www.huayingsoft.com/" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=8,IE=9,IE=10" />
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store">

    <link rel="stylesheet" href="../../css/bootstrap.min.css">
    <link rel="stylesheet" href="../../css/bootstrapEx.css">

    <script src="../../js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../../js/global.js"></script>
    <script type="text/javascript" src="../../js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../js/bootstrapEx2.0.js"></script>
</head>
<body>
    <span style='font-size:20px;font-weight:bold;'>按钮点击事件</span>
    <p/>
    <div class="container-fluid">
        <button id="btn1" data-loading-text="加载中...">按钮点击事件</button>
    </div>
</body>
<script>
     $(document).ready(function () {
        InitButton1();
     });

     function InitButton1(){
         var btn1 = new bsEx.Button({
            renderto:"#btn1",
            text:false//text传false 默认显示标签原始内容
         });
         btn1.on("click",function(t){
            t.loading().delay(1000).queue(function() {
                t.reset();
                $(this).dequeue();
			});
         })
     }
</script>
</html>